package cn.com.chengmandian.bike.controller;


import cn.com.chengmandian.agent.utils.AuthUtil;
import cn.com.chengmandian.bike.service.IEbMessageChannelService;
import cn.com.chengmandian.core.web.pojo.AgentUser;
import cn.com.chengmandian.core.web.pojo.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 电单车运营-系统消息频道 前端控制器
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-30
 */
@Api(tags ="消息频道接口")
@RestController
@RequestMapping("/message/channel")
public class EbMessageChannelController {

    @Resource
    private IEbMessageChannelService messageChannelService;

    @ApiOperation("所有消息频道列表")
    @GetMapping("/list")
    public AjaxResult<?> selectMessageChannelList() {
        AgentUser user = AuthUtil.getAgentUser();
        return AjaxResult.success(messageChannelService.selectMessageChannelList(user.getId()));
    }

}
